import instance from '@/utils/request'

// 关注用户
export function followUser(data) {
    return instance.request({
        method: 'post',
        url: '/follow',
        data
    })
}

// 取消关注
export function unfollowUser(followId) {
    return instance.request({
        method: 'delete',
        url: `/unfollow/${followId}`
    })
}

// 获取关注列表
export function getFollowingList(userId, params = {}) {
    return instance.request({
        method: 'get',
        url: `/following/${userId}`,
        params
    })
}

// 获取粉丝列表
export function getFollowersList(userId, params = {}) {
    return instance.request({
        method: 'get',
        url: `/followers/${userId}`,
        params
    })
}



